package designPattern.facade;

public class Facade {
	public static void main(String[] args) {
		StoreKeeper keeper = new StoreKeeper();
		RawMaterialGoods goods = (RawMaterialGoods) keeper.getGoods("RawMaterials");
	}
}

class StoreKeeper {

	// start of method...
	public Goods getGoods(String goodsType) {
		
		if (goodsType.equals("Packaging")) {
			PackingMaterialStore store = new PackingMaterialStore();
			PackingMaterialGoods packingMaterialGoods = (PackingMaterialGoods) store.getGoods();
			return packingMaterialGoods;
			
		} else if (goodsType.equals("Finished")) {
			FinishedGoodsStore store = new FinishedGoodsStore();
			FinishedGoods finishedGoods = (FinishedGoods) store.getGoods();
			return finishedGoods;
			
		} else {
			RawMaterialStore store = new RawMaterialStore();
			RawMaterialGoods rawMaterialGoods = (RawMaterialGoods) store.getGoods();
			return rawMaterialGoods;
		}

	} // end of method...

} // End of class